'use strict'
class content{
    constructor (){

    }
    async get(c) {
        let id = c.param.id;
        let sqltext = `SELECT * FROM activity WHERE "activityId"=$1`;
        let r = await c.service.psql.query(sqltext,[id]);
        console.log(r.rows)
        c.send(JSON.stringify(r.rows))
    }
    async list(c){
        let sqltext = `SELECT * FROM activity ORDER BY "activityId" DESC`;
        let r = await c.service.psql.query(sqltext,[]);
        console.log(r.rows)
        c.send(JSON.stringify(r.rows))
    }
}
module.exports = content;